<template>
	<view>
		<view style="z-index: 100;" class="position-absolute left-0 top-0 right-0 bottom-0 flex align-center justify-center">
			<view @click="logout" style="width: 85vw;" class="bg-main text-white flex align-center justify-center font-md py-2 rounded-circle ">
				退出登录
			</view>
		</view>
	</view>
</template>

<script>
	import uniStatusBar from '@/components/uni-ui/uni-status-bar/uni-status-bar.vue';
	export default {
		components: {
			uniStatusBar
		},
		data() {
			return {
				type: 'login',
				form: {
					username: '',
					password: '',
					repassword: ''
				}
			}
		},
		methods: {
			
			back() {
				uni.navigateBack({
					delta: 1
				});
			},
			logout() {
				uni.showModal({
					content: '是否确定退出登录',
					success:  (result) =>{
						if (result.confirm) {
							this.$store.dispatch('logout').then(res=>{
								uni.showToast({
									title: '退出登录成功',
									icon: 'none'
								});
								
							})
						}
					}
				});
				
			}
		}
	}
</script>

<style>

</style>
